.class Lrexsee/core/browser/RexseePrompt$55;
.super Ljava/lang/Object;
.source "RexseePrompt.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseePrompt;->showDate(Lrexsee/core/browser/clazz/PromptArgumentsSheet;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseePrompt;

.field private final synthetic val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

.field private final synthetic val$picker:Landroid/widget/DatePicker;

.field private final synthetic val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseePrompt;Landroid/widget/DatePicker;Lrexsee/core/browser/clazz/PromptArgumentsSheet;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseePrompt$55;->this$0:Lrexsee/core/browser/RexseePrompt;

    iput-object p2, p0, Lrexsee/core/browser/RexseePrompt$55;->val$picker:Landroid/widget/DatePicker;

    iput-object p3, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iput-object p4, p0, Lrexsee/core/browser/RexseePrompt$55;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    .line 1191
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 6
    .param p1, "dialog"    # Landroid/content/DialogInterface;
    .param p2, "whichButton"    # I

    .prologue
    .line 1194
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    .line 1195
    packed-switch p2, :pswitch_data_0

    .line 1211
    :goto_0
    return-void

    .line 1197
    :pswitch_0
    iget-object v2, p0, Lrexsee/core/browser/RexseePrompt$55;->val$picker:Landroid/widget/DatePicker;

    invoke-virtual {v2}, Landroid/widget/DatePicker;->clearFocus()V

    .line 1198
    iget-object v2, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-object v2, v2, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->calendar:Ljava/util/Calendar;

    invoke-virtual {v2}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

    move-result-object v0

    .line 1199
    .local v0, "date":Ljava/util/Date;
    const-string v1, "{"

    .line 1200
    .local v1, "rtn":Ljava/lang/String;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-boolean v3, v3, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->yearEnable:Z

    if-eqz v3, :cond_0

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "\"year\":"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    new-instance v4, Ljava/text/SimpleDateFormat;

    const-string v5, "yyyy"

    invoke-direct {v4, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    :goto_1
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1201
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-boolean v3, v3, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->monthEnable:Z

    if-eqz v3, :cond_1

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, ",\"month\":"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    new-instance v4, Ljava/text/SimpleDateFormat;

    const-string v5, "M"

    invoke-direct {v4, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    :goto_2
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1202
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-boolean v3, v3, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->dayEnable:Z

    if-eqz v3, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, ",\"day\":"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    new-instance v4, Ljava/text/SimpleDateFormat;

    const-string v5, "d"

    invoke-direct {v4, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    :goto_3
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1203
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$55;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-boolean v3, v3, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->dayEnable:Z

    if-eqz v3, :cond_3

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, ",\"week\":\""

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    new-instance v4, Ljava/text/SimpleDateFormat;

    const-string v5, "E"

    invoke-direct {v4, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    :goto_4
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1204
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "}"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 1205
    iget-object v2, p0, Lrexsee/core/browser/RexseePrompt$55;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    invoke-virtual {v2, v1}, Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;->run(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1200
    :cond_0
    const-string v3, "\"year\":-1"

    goto/16 :goto_1

    .line 1201
    :cond_1
    const-string v3, ",\"month\":-1"

    goto/16 :goto_2

    .line 1202
    :cond_2
    const-string v3, ",\"day\":-1"

    goto :goto_3

    .line 1203
    :cond_3
    const-string v3, ",\"week\":\"\""

    goto :goto_4

    .line 1208
    .end local v0    # "date":Ljava/util/Date;
    .end local v1    # "rtn":Ljava/lang/String;
    :pswitch_1
    iget-object v2, p0, Lrexsee/core/browser/RexseePrompt$55;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;->run(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1195
    :pswitch_data_0
    .packed-switch -0x2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
